<?php if (!defined('THINK_PATH')) exit();?><html>
<head>
  <meta charset="UTF-8">

   <link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet">
   <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/main_style.css">
   <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
   <script src="__PUBLIC__/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<?php if(is_array($stu)): foreach($stu as $key=>$stuv): ?><div >
      <h1>更改学生信息</h1>
      <form role="form" class="form1" action="<?php echo U(GROUP_NAME . '/Information/update');?>" method="post">
        <div class="form-group" id="information_query">
          <span>请根据学号更改信息</span>
          <br/>
          <span style="color:red">输入学号后点查询再进行修改</span>
         <br/><br/>
         <span>学号</span>
        <input type="text" class="form-control" id="input" 
         placeholder="请输入学号" name="num" value="<?php echo ($stuv["num"]); ?>">
            <input type="submit" name="upd_sel" value="查询" class="btn btn-default"/>
            <br /><br />
         <span>姓名</span>
        <input type="text" class="form-control" id="input" 
         placeholder="请输入名称" name="name" value="<?php echo ($stuv["name"]); ?>">
         <span>性别</span>
         <select class="form-control" id="input" name="sex" selected="<?php echo ($stuv["sex"]); ?>">
             <?php if($stuv['sex']=='女'): ?><option value ="女" selected="selected">女</option>
                 <?php else: ?> <option value ="男" selected="selected">男</option><?php endif; ?>
         </select>
         <span>出生日期</span>
        <input type="date" class="form-control" id="input" 
         placeholder="请输入出生日期" name="date" value="<?php echo ($stuv["date"]); ?>">
         
         <span>系别</span>
         <select class="form-control" id="input" name="department">
             <?php switch($stuv["department"]): case "软件工程": ?><option value ="软件工程" selected="selected">软件工程</option><?php break;?>
                 <?php case "网络工程": ?><option value ="网络工程" selected="selected">网络工程</option><?php break;?>
                 <?php case "计算机科学与技术": ?><option value ="计算机科学与技术" selected="selected">计算机科学与技术</option><?php break;?>1
                 <?php default: ?><option value ="软件工程">软件工程</option>
                             <option value ="网络工程">网络工程</option>
                             <option value ="计算机科学与技术">计算机科学与技术</option><?php endswitch;?>
         </select>
         <span>班级</span>
         <select class="form-control" id="input" name="class">
             <?php switch($stuv["class"]): case "1班": ?><option value ="1班" selected="selected">1班</option><?php break;?>
                 <?php case "2班": ?><option value ="2班" selected="selected">2班</option><?php break;?>
                 <?php case "3班": ?><option value ="3班" selected="selected">3班</option><?php break;?>
                 <?php case "4班": ?><option value ="4班" selected="selected">4班</option><?php break;?>
                 <?php case "5班": ?><option value ="5班" selected="selected">5班</option><?php break;?>
                 <?php default: ?><option value ="1班">1班</option>
                             <option value ="2班">2班</option>
                             <option value ="3班">3班</option>
                             <option value ="4班">4班</option>
                             <option value ="5班">5班</option><?php endswitch;?>
         </select>
      <span role="form" class="form2">
        <div class="form-group">
         <div class="student_img"></div>
         <label for="inputfile">选择照片</label>
         <input type="file" id="inputfile" name="photo">
        </div>
         <span>籍贯</span>
        <input type="text" class="form-control" id="input" 
         placeholder="请输入籍贯" name="place" value="<?php echo ($stuv["place"]); ?>">
         <span>入学日期</span>
        <input type="date" class="form-control" id="input" 
         placeholder="请输入入学日期" name="comeDate" value="<?php echo ($stuv["comeDate"]); ?>">
        </div>
        <input type="submit" class="btn btn-default" name="submit" value="提交"/>
      </span>
      </form>
      <form role="form" class="form3" action="<?php echo U(GROUP_NAME . '/Information/delete');?>" method="post">
         <h2>删除学生信息</h2>
         <span>请根据学号删除信息</span>
         <br/><br/>
         <span>输入需删除学生的学号</span>
         <input type="text" class="form-control" id="input" 
         placeholder="请输入学号" name="num">
         <input type="submit" class="btn btn-default" name="submit" value="删除">
      </form>
         
   </div><?php endforeach; endif; ?>
</body>
</html>